package com.atguigu.shiro.service;

import com.atguigu.shiro.entity.User;

import java.util.List;

/**
 * className: UserService
 * description:
 * date: 2024/6/18-10:24
 * <p>
 * project: shiro
 * package: com.atguigu.shiro.service
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public interface UserService {
    /**
     * 用户登录
     *
     * @param name {@link  String}
     * @return {@link User}
     */
    User getUserInfoByName(String name);

    /**
     * 获取用户的角色信息
     *
     * @param principal {@link String}
     * @return {@link List<String>}
     */
    List<String> getUserRoleInfo(String principal);

    /**
     * 获取用户的权限信息
     *
     * @param roles {@link List<String>}
     * @return {@link List<String>}
     */
    List<String> getUserPermissionInfo(List<String> roles);
}
